How to pass array data from Laravel Inertia Js render method to child component from parent component in Vue 3? | 您所在的位置:网站首页 › vue laravel › How to pass array data from Laravel Inertia Js render method to child component from parent component in Vue 3? |
How to pass array data from Laravel Inertia Js render method to child component from parent component in Vue 3?
03 Apr, 2023
Programming
0
I’m having users’ array data and rendering this from route to Dashboard.vue component through inertia render method, where I’m unable to pass users data from Dashboard.vue component to Users.vue component. Route::get('/dashboard', function () { $users = User::all(); return Inertia::render('Dashboard', ['users' => $users]); })->name('dashboard'); Dashbaord.vue parent component //this one passing {{ $users }} as string data in props.//this one getting syntax error. Users.vue child component Component Displayed{{ title }} {{ user.name }}export default{ props:{ users:Array, title:String } } Can anyone suggest to me how to pass array data from one component to another component in Vue js? |
CopyRight 2018-2019 实验室设备网 版权所有 |